package com.example.widgetcase.slice;

import com.example.widget_lib.widget.progress.horbar.ShadowProBar;
import com.example.widgetcase.ResourceTable;
import ohos.aafwk.content.Intent;
import ohos.agp.components.Button;

public class ShadowProBarAblility extends BaseSlice {

    private ShadowProBar spbIng;
    private Button endBtn;

    @Override
    public int getChildUIContent() {
        return ResourceTable.Layout_shadow_probar;
    }

    @Override
    protected void onStart(Intent intent) {
        super.onStart(intent);
        spbIng = (ShadowProBar) findComponentById(ResourceTable.Id_spbIng);
        endBtn = (Button) findComponentById(ResourceTable.Id_endBtn);

        spbIng.setProgressWithAnimation(76);
//        spbIng.setProStatus(false);

        endBtn.setClickedListener(component -> {
            spbIng.setProgressWithAnimation(100);
            spbIng.setProStatus(true);
        });
    }
}
